package com.at.c02_classloader.load;

/**
 * 创建ClassLoader的方式
 *
 * @author huangchao E-mail:fengquan8866@163.com
 * @version 创建时间：2024/6/23 9:45
 */
public class ClassLoaderTest2 {
    public static void main(String[] args) throws ClassNotFoundException {
        ClassLoader classLoader = Class.forName("java.lang.String").getClassLoader();
        System.out.println(classLoader);

        // 2.
        ClassLoader classLoader1 = Thread.currentThread().getContextClassLoader();
        System.out.println(classLoader1);

        // 3.
        ClassLoader classLoader2 = ClassLoader.getSystemClassLoader().getParent();
        System.out.println(classLoader2);
    }
}
